//
//  TempViewController.swift
//  weibo
//
//  Created by 上官风雨 on 15/11/16.
//  Copyright © 2015年 上官风雨. All rights reserved.
//

import UIKit

class TempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
//        self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "返回", style: .Plain, target: self, action: "back")
        
        self.title = "\(self.navigationController?.childViewControllers.count)页"
        
        

       view.backgroundColor = UIColor.radomColor()
    }
    
    
    override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
        
        let temp = TempViewController()
        
        self.navigationController?.pushViewController(temp, animated: true)
    }
    
    func back(){
        
        navigationController?.popViewControllerAnimated(true)
        
    }

   
}
